<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<jsp:directive.page import="com.anhry.app.safety.util.Util"/>
<%@ include file="/WEB-INF/pages/share/taglib.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>企业添加</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link href="<%=basePath+Util.SKIN%>/css/right.css" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="<%=basePath%>/js/jquery-1.7.2.js"></script>
	
	<script type="text/javascript">
		function fnClick(){
		  	var corpClose=$("input[name='corpClose']:checked").val();
	   		if(corpClose=="1"){
	   			$("#span1").removeClass("menuitem1");
	   			$("#span1").addClass("menuitem");
	   			$("#corpCloseWhy").val('');
	   		}else if(corpClose=="2"){
	   			$("#span1").removeClass("menuitem1");
	   			$("#span1").addClass("menuitem");
	   			$("#corpCloseWhy").val('');
	   		}else if(corpClose=="9"){
	   			$("#span1").removeClass("menuitem");
	   			$("#span1").addClass("menuitem1");
	   		}
	  	
	  	}
	  	function fnSearch(){
	  		var api = frameElement.api, W = api.opener;
		  	W.corpForm.submit();
      	}
      
      	function fnSubmit(){
	    	var corpClose=$("input[name='corpClose']:checked").val();
	   		if(corpClose==null||corpClose==""){
	   			alert("请选择关闭理由！");
	   			return false;
	   		}
	   		return true;
      	}
	</script>
	<style>
		* html body {padding:0px 0px 6px 0px;}
		.menuitem {float:left;POSITION: absolute; VISIBILITY: hidden;}
		.menuitem1 {float:left;POSITION: static; VISIBILITY: visible;}
	</style>
  </head>
  
  <body>
	<div  class="body-box">
		<div id="container">
			<form action="<%=basePath%>/enterprise/corp_corpDele.action" method="post" name="form1">
		    	<table border="0" cellpadding="0" cellspacing="0" class="mytable">
			   		<thead>
				    	<tr class="fixedHeaderTr">
				     		<th>${corp.corpName }</th>
				    	</tr>
			   		</thead>
				   	<tbody>
				   		<tr>
				     		<td align="left"><input type="radio" name="corpClose" id="close1" value="1" onclick="fnClick()"><label for="close1">倒闭或彻底关闭</label></td>
				    	</tr>
				   		<tr>
				     		<td align="left"><input type="radio" name="corpClose" id="close2" value="2" onclick="fnClick()"><label for="close2">搬迁或拆迁</label></td>
				    	</tr>
				   		<tr>
				     		<td align="left">
				     			<input type="radio" name="corpClose" id="close3" value="9" onclick="fnClick()"><label for="close3">其他</label>
					     		<span id="span1" class="menuitem">
				    				<textarea rows="3" cols="30" id="corpCloseWhy" name="corpCloseWhy"></textarea>
				    			</span>
				     		</td>
				    	</tr>
				    	<tr>
				     		<td align="center"><input type="submit" name="btntj" class="link_input" id="btnSubmit1" value="提 交" onclick="return fnSubmit();"></td>
				    	</tr>
				   	</tbody>
			  	</table>
				<input type="hidden" name="corpId" value="${corp.id }">
			</form>
		</div>
	</div>
  </body>
  <s:if test="%{tip!=null}">
	<script>
		alert('${tip}');
		fnSearch();
	</script>
  </s:if>
</html>
